<template>
  <div class="app">
    <h1>我是App组件</h1>
    <Person 
      :str="str" 
      :updateStr="updateStr"
      :gender="gender"
      :updateGender="updateGender"
      :isAgree="isAgree"
      :updateIsAgress="updateIsAgress"
    /> 
  </div>
</template>

<script>
  import Person from './components/Person'

  export default {
    name:'App',
    components:{Person},
    data() {
      return {
        str:'你好啊',
        gender:'男',
        isAgree:true
      }
    },
    methods: {
      updateStr(value){
        this.str = value
      },
      updateGender(value){
        this.gender = value
      },
      updateIsAgress(value){
        this.isAgree = value
      }
    },
  }
</script>

<style>
  .app {
    background-color: gray;
    padding: 20px;
  }
</style>